VERSION 5.00
Begin VB.Form RegMenuForm 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   9000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   11880
   LinkTopic       =   "Form1"
   ScaleHeight     =   9000
   ScaleWidth      =   11880
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.CommandButton CleanupButton 
      Height          =   735
      Left            =   1800
      TabIndex        =   20
      Top             =   7200
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.CommandButton MainMenu_Button 
      Height          =   735
      Left            =   1800
      TabIndex        =   15
      Top             =   5040
      Width           =   975
   End
   Begin VB.CommandButton Female_Button 
      Height          =   735
      Left            =   1800
      TabIndex        =   7
      Top             =   3960
      Width           =   975
   End
   Begin VB.Timer Timer3 
      Interval        =   20000
      Left            =   11520
      Top             =   2640
   End
   Begin VB.Timer Timer2 
      Interval        =   1000
      Left            =   11520
      Top             =   2040
   End
   Begin VB.CommandButton Male_Button 
      Height          =   735
      Left            =   1800
      TabIndex        =   3
      Top             =   2880
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Secure the workstation"
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   7200
      TabIndex        =   0
      Top             =   360
      Width           =   4215
   End
   Begin VB.Label CleanupLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Delete 940601 recs"
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3000
      TabIndex        =   21
      Top             =   7320
      Visible         =   0   'False
      Width           =   3375
   End
   Begin VB.Label SystemStat_Label 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "System Statistics"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   7560
      TabIndex        =   19
      Top             =   2160
      Width           =   2295
   End
   Begin VB.Label Label5 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Clients Reg. Today:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   7800
      TabIndex        =   18
      Top             =   3720
      Width           =   2055
   End
   Begin VB.Label ClientRegToday_Label 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   9840
      TabIndex        =   17
      Top             =   3720
      Width           =   1095
   End
   Begin VB.Label MainMenu_Label 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Main Menu"
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   615
      Left            =   3000
      TabIndex        =   16
      Top             =   5220
      Width           =   3375
   End
   Begin VB.Label RecCount_Data 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   9840
      TabIndex        =   14
      Top             =   4200
      Width           =   1095
   End
   Begin VB.Label Label2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Records on Server:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   7800
      TabIndex        =   13
      Top             =   4200
      Width           =   2055
   End
   Begin VB.Label NextCouplesCode_Data 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   9840
      TabIndex        =   12
      Top             =   3240
      Width           =   1095
   End
   Begin VB.Label NextClientCode_Data 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   9840
      TabIndex        =   11
      Top             =   2760
      Width           =   1095
   End
   Begin VB.Label NextCouplesCode_Label 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Next Couple Code:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   7800
      TabIndex        =   10
      Top             =   3240
      Width           =   2055
   End
   Begin VB.Label NextClientCode_Label 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Next Client Code:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   7800
      TabIndex        =   9
      Top             =   2760
      Width           =   2055
   End
   Begin VB.Shape Shape3 
      BackColor       =   &H00E0E0E0&
      BackStyle       =   1  'Opaque
      BorderWidth     =   2
      Height          =   4095
      Left            =   7200
      Top             =   1680
      Width           =   4215
   End
   Begin VB.Label Female_Label 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Female Client"
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3000
      TabIndex        =   8
      Top             =   4080
      Width           =   2535
   End
   Begin VB.Label Label3 
      BackColor       =   &H00C0FFFF&
      Caption         =   "Client Registration"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   24
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   1320
      TabIndex        =   4
      Top             =   2040
      Width           =   4455
   End
   Begin VB.Label Male_Label 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Male Client"
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3000
      TabIndex        =   2
      Top             =   3000
      Width           =   2295
   End
   Begin VB.Label Date_Label 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Date"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   720
      TabIndex        =   6
      Top             =   840
      Width           =   3255
   End
   Begin VB.Label UserName_Label 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Username goes here ..."
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   720
      TabIndex        =   1
      Top             =   360
      Width           =   5775
   End
   Begin VB.Shape Shape2 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   1  'Opaque
      BorderWidth     =   2
      Height          =   6975
      Left            =   480
      Top             =   1680
      Width           =   6375
   End
   Begin VB.Label Clock_Label 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Time"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4200
      TabIndex        =   5
      Top             =   840
      Width           =   2535
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   1  'Opaque
      BorderWidth     =   2
      FillColor       =   &H00FFFFFF&
      Height          =   1095
      Left            =   480
      Shape           =   4  'Rounded Rectangle
      Top             =   240
      Width           =   6375
   End
End
Attribute VB_Name = "RegMenuForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TimeCounter As Integer
Private ShiftPressed As Boolean
Private TempArr() As String

'This is for the barcode
'Public Sub System_KeyDown(KeyCode As Integer, Shift As Integer)
'
'   Select Case KeyCode
'      Case 48 To 57, 47, 80 'check for the $ sign
'         If (ShiftPressed And KeyCode) = 52 Then
'            TempArr() = Split(Pat_Barcode_Str, "/")
'            Pat_Dept = TempArr(0)
'            Pat_Num = TempArr(1)
'            Yr_Reg = TempArr(2)
'            RemoveHook
'            Pat_Details.Show
'            Unload Me
'         Else
'            ShiftPressed = False
'            Pat_Barcode_Str = Pat_Barcode_Str & Chr(KeyCode)
'         End If
'      Case 16
'         ShiftPressed = True
'   End Select
'End Sub


Private Sub CleanupButton_Click()
   CleanupForm.Show
   Unload Me
End Sub

Private Sub Command1_Click()
   LoginForm.Show
   'RemoveHook
   Unload Me
   'rc = UpdateLog(UserPwd, "Logout", "", Machine_Id)
End Sub

Private Sub Couple_Button_Click()
   SESSTYPE = "01"
   CoupleForm.Show
   Unload Me
End Sub

Private Sub Female_Button_Click()
   SEX = "2"
   IndividualForm.Show
   Unload Me
End Sub

Private Sub Form_Load()

   'Initialize variables
   'COUPCODE = ""
   'PARTCODE = ""
   'P_COUPCODE = ""
   'P_PARTCODE = ""
   
   If UserPwd = "111111" Then
      CleanupLabel.Visible = True
      CleanupButton.Visible = True
   Else
      CleanupLabel.Visible = False
      CleanupButton.Visible = False
   End If

'   NewNextClientCode = NextClientCode
'   NewNextCoupleCode = NextCoupleCode
   NextClientCode = GetNextClientCode
   NextCoupleCode = GetNextCoupleCode
   
   If NextClientCode = 0 Then
      NextClientCode_Data.Caption = "Not Set"
   Else
      NextClientCode_Data.Caption = NextClientCode
   End If
   
   If NextCoupleCode = 0 Then
      NextCouplesCode_Data.Caption = "Not Set"
   Else
      NextCouplesCode_Data.Caption = NextCoupleCode
   End If

   If NextClientCode = 0 Or NextCoupleCode = 0 Then
      Male_Button.Enabled = False
      Female_Button.Enabled = False
      Male_Label.Enabled = False
      Female_Label.Enabled = False
   End If

   'This is for the barcode scanner
   'SetHook Me, HFKeyDown
   Pat_Barcode_Str = ""
   ShiftPressed = False

   Clock_Label.Caption = "Time: " & Time
   Date_Label.Caption = "Date: " & StringDate
   UserName_Label.Caption = "User: " + TrimAll(UserFirst) + " " + TrimAll(UserLast)
   TimeCounter = 0
   'MenuForm.BackColor = vbWhite
   
   'Get the record count for today
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUNT(*)" _
                  & " FROM   client" _
                  & " WHERE  VDATE = '" & StringDate & "'"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   ClientRegToday_Label.Caption = RsUser(0)
   RsUser.Close
   CnUser.Close
   
   'Get the current record count on the server
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUNT(*)" _
                  & " FROM   client"
   Cmd.CommandType = adCmdText
   Cmd.ActiveConnection = CnUser
   RsUser.Open Cmd, , adOpenStatic
   RecCount_Data.Caption = RsUser(0)
   RsUser.Close
   CnUser.Close
   
End Sub

'Private Sub Outpatient_Register_Button_Click()
'   RemoveHook
'   Outpatient_Register_Form.Show
'   Unload Me
'End Sub

Private Sub Rec_Dischagre_But_Click()
   'RemoveHook
   Discharge_Wait_List_Form.Show
   Unload Me
End Sub

'Private Sub Timer1_Timer()
'   TimeCounter = TimeCounter + 1
'   If TimeCounter > 50 Then
'      RemoveHook
'      LoginForm.Show
'      Unload Me
'     ' rc = UpdateLog(UserPwd, "Logout", "Auto Logout", Machine_Id)
'   End If
'End Sub

Private Sub MainMenu_Button_Click()
   VCTStageForm.Show
   Unload Me
End Sub


Private Sub Male_Button_Click()
   SEX = "1"
   IndividualForm.Show
   Unload Me
End Sub

Private Sub Timer2_Timer()
   Clock_Label.Caption = "Time: " & Time
End Sub

Private Sub Timer3_Timer()
   Date_Label.Caption = "Date: " & StringDate
End Sub

